package study.edumanagesystemspringboot.entity;

import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import javax.persistence.DiscriminatorValue;
import java.util.Map;

/**
 * @author zouran
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Component
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@DiscriminatorValue("teacher")
@ToString(callSuper = true)
public class Teacher extends Person {

    private Double satisfaction;
    private String title;

    /**
     * @return 人物身份
     */
    @Override
    public String getIdentify() {
        return "teacher";
    }

    @Override
    public Map<String, Object> accept(Visitor visitor) {
        return visitor.visit(this);
    }
}
